package com.hue.springbootneo4j.repository;

import com.hue.springbootneo4j.entity.PersonRelationShip;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface PersonRelationShipRepository extends Neo4jRepository<PersonRelationShip, Long> {
    @Query("match (p1:Person{name:{0}}),(p2:Person{name:{1}}) create (p1)-[:PersonRelationShip{relation:{2}}]->(p2)")
    void createRelationShip(String startName,String endName,String relation);
}
